package com.ailink.foodshop.exception;

import com.ailink.foodshop.enums.ResultEnum;
import lombok.Getter;

/**
 * @author lh
 * @date 2017/12/21 00:00
 */
@Getter
public class SysException extends RuntimeException {

    private Integer code;

    public SysException(ResultEnum resultEnum) {
        super(resultEnum.getMessage());

        this.code = resultEnum.getCode();
    }

    public SysException(Integer code, String message) {
        super(message);

        this.code = code;
    }
}
